﻿using System;
using System.Reflection;

namespace Sencha.Direct
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
	public class AllowParallelAttribute : Attribute
	{
		public static bool IsDefined(ICustomAttributeProvider attrs)
		{
			if (attrs == null)
				throw new ArgumentNullException("attrs");

			var foundAttrs = attrs.GetCustomAttributes(typeof(AllowParallelAttribute), true);
			return (foundAttrs != null && foundAttrs.Length > 0);
		}
	}
}
